<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>运算符</title>

    <script>
        var a = 123
        var str = "123"

        if ( a == str) {            //比较数值
            console.log("相等")
        } else {
            console.log("不相等")
        }

        if ( a === str) {           //比较数值  类型
            console.log("相等")
        } else {
            console.log("不相等")
        }


        //三目运算符     //if ... else ...
        (a === str) ? console.log("111111") : console.log("222")




    </script>

</head>
<body>

</body>
</html>